/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.model;

import br.com.foxline.enums.TypeTitleDocument;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;

/**
 *
 * @author ely
 */
@Entity
public class TitleDocument implements Serializable {

    @Id
    @SequenceGenerator(sequenceName = "seq_title", name = "seq_title", allocationSize = 1)
    @GeneratedValue(generator = "seq_title", strategy = GenerationType.SEQUENCE)
    private Long id;
    private String register;
    private String protocolo;
    private String bookprot; // livro Protocolo
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date datebp;   // data livro Protocolo
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date datetdoc; // data titulo 
    
    private String book;
    private String bookComp;
    private String leaf;
    private String leafComp;
    
    private String obj; // objeto
    private String obs; // observaçao
    
    @Enumerated(EnumType.STRING)
    private TypeTitleDocument typeTitleDocument;
    
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date datetcad; // data de cadastro
    
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private List<Part> parts;
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private List<Stamp> stamp;
    @OneToMany(cascade = CascadeType.ALL)
    private List<Annex> annex;

    public TitleDocument() {
    }

    public TypeTitleDocument getTypeTitleDocument() {
        return typeTitleDocument;
    }

    public void setTypeTitleDocument(TypeTitleDocument typeTitleDocument) {
        this.typeTitleDocument = typeTitleDocument;
    }
    
    public List<Annex> getAnnex() {
        return annex;
    }

    public void setAnnex(List<Annex> annex) {
        this.annex = annex;
    }

    public String getBook() {
        return book;
    }

    public void setBook(String book) {
        this.book = book;
    }

    public String getBookComp() {
        return bookComp;
    }

    public void setBookComp(String bookComp) {
        this.bookComp = bookComp;
    }

    public String getBookprot() {
        return bookprot;
    }

    public void setBookprot(String bookprot) {
        this.bookprot = bookprot;
    }

    public Date getDatebp() {
        return datebp;
    }

    public void setDatebp(Date datebp) {
        this.datebp = datebp;
    }

    public Date getDatetcad() {
        return datetcad;
    }

    public void setDatetcad(Date datetcad) {
        this.datetcad = datetcad;
    }

    public Date getDatetdoc() {
        return datetdoc;
    }

    public void setDatetdoc(Date datetdoc) {
        this.datetdoc = datetdoc;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLeaf() {
        return leaf;
    }

    public void setLeaf(String leaf) {
        this.leaf = leaf;
    }

    public String getLeafComp() {
        return leafComp;
    }

    public void setLeafComp(String leafComp) {
        this.leafComp = leafComp;
    }

    public String getObj() {
        return obj;
    }

    public void setObj(String obj) {
        this.obj = obj;
    }

    public String getObs() {
        return obs;
    }

    public void setObs(String obs) {
        this.obs = obs;
    }

    public List<Part> getParts() {
        return parts;
    }

    public void setParts(List<Part> parts) {
        this.parts = parts;
    }

    public String getProtocolo() {
        return protocolo;
    }

    public void setProtocolo(String protocolo) {
        this.protocolo = protocolo;
    }

    public String getRegister() {
        return register;
    }

    public void setRegister(String register) {
        this.register = register;
    }

    public List<Stamp> getStamp() {
        return stamp;
    }

    public void setStamp(List<Stamp> stamp) {
        this.stamp = stamp;
    }
    
    


}
